package com.fin.zw.aiqas.controller;

import com.fin.zw.aiqas.model.request.SimulatorRequest;
import com.fin.zw.aiqas.service.SimulatorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/simulator")
@Api(value = "模拟质检", description = "模拟质检")
public class SimulatorController {

    @Autowired
    private SimulatorService simulatorService;

    @PostMapping("/simulator")
    @ApiOperation(value = "模拟质检", notes = "模拟质检")
    public ResponseEntity<String> simulator(@RequestBody SimulatorRequest request) {
        simulatorService.simulatorDetection(request);
        return ResponseEntity.ok().body("操作成功");
    }
}
